import wepy from 'wepy'

export default {
  requestUrl: 'https://goktech.s1.natapp.cc/fqnp',
  async wxGetStorage(key) {
    try {
      let value = await wepy.getStorageSync(key)
      if (value) {
        // console.log(value)
        return value
      } else {
        return 0
      }
    } catch (e) {
      console.log(e)
    }
  },
  async wxSetStorage(key, value) {
    try {
      await wepy.setStorageSync(key, value)
    } catch (e) {
      console.log(e)
    }
  }
}